// eslint-disable-next-line import/no-extraneous-dependencies
import mockjs from 'mockjs';

export default {
  'POST /api/order/add': (req, res) => {
    res.send(
      mockjs.mock(
        {
          ret: 0,
          error: null
        }
      ),
    );
  },
  'POST /api/order/list': (req, res) => {
    res.send(
      mockjs.mock(
        {
          ret: 0,
          data: {
            list: [
              {
                id: 1238128423951,
                ordName: "张三",
                ordMoney: 1000,
                ordTime: 1627376921,
                ordState: true
              },
              {
                id: 1238128423951,
                ordName: "张三",
                ordMoney: 1000,
                ordTime: 1627376921,
                ordState: false
              },
              {
                id: 1238128423951,
                ordName: "张三",
                ordMoney: 1000,
                ordTime: 1627376921,
                ordState: false
              },
              {
                id: 1238128423951,
                ordName: "张三",
                ordMoney: 1000,
                ordTime: 1627376921,
                ordState: true
              },
            ],
            total: 4,
            query: 4
          },
          error: null
        }
      ),
    );
  },
}
